package com.zjh.springcloud.feign;

import com.zjh.common.R;
import com.zjh.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ClassName: UserFeign
 * Description:
 * @Author zjh
 * @Create 2023/10/10 9:32
 */
@FeignClient(value = "user",path = "/user")
//@FeignClient("user")
public interface UserFeign {
	
	
	@GetMapping("/findAll/{begin}/{pagesize}")
	public R<List<User>> findAllUser(@PathVariable("begin") Integer begin, @PathVariable("pagesize") Integer pagesize);
	
	@DeleteMapping("/deleteById/{id}")
	public void deleteById(@PathVariable("id") Integer id);
	
	@PostMapping("/save")
	public void saveOne(@RequestBody User user);
}
